package com.itheima.app;

import com.itheima.bean.Cat;
import com.itheima.config.SpringConfig3;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ConfigurationClassPostProcessor;

public class App3 {
    public static void main(String[] args) {
        int HIGHEST_PRECEDENCE=ConfigurationClassPostProcessor.HIGHEST_PRECEDENCE;
        ApplicationContext ctx=new AnnotationConfigApplicationContext(SpringConfig3.class);
        String[] names = ctx.getBeanDefinitionNames();
        for (String name : names) {
            System.out.println(name);
        }
        System.out.println(ctx.getBean(Cat.class).getMouse().getClass());
    }
}
